home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / mwjpp516.exe / %MAINDIR% / Tools / Configuration / replace JDK compiler.script < prev    next >
Encoding:
Text File  |  2001-06-19  |  1.2 KB  |  44 lines

  1. !!Script
  2. // Copyright ⌐ 1997-1998 - Modelworks Software
  3.  
  4. /**
  5. @Tool: replace JDK compiler~displays a open file dialog to let you select 
  6. a replacement for your JDK compiler. Note that this will only work if the new 
  7. compiler uses the -classpath and -d command line options. 
  8. @EndTip:
  9. @EndTool: 
  10. @Summary: replace JDK compiler~lets you choose a replacement for you JDK compiler
  11. */
  12.  
  13. var gOutput = getOutput();
  14. var gHelpers = getMapFile("ApplicationHelpers");
  15. var gOptions = getMapFile("JDKToolsStandardOptions");
  16.  
  17. function DoCommand()
  18. {
  19.   var compilePath = gHelpers.lookup("jdk-compiler", "");
  20.   if (compilePath.exists)
  21.   {
  22.     if (confirm("Your current compiler is: \"" + compilePath.path + 
  23.       "\". Do you want to choose a new compiler?"))
  24.     {
  25.       SetNewCompiler();
  26.     }
  27.   }
  28. }
  29.  
  30. function SetNewCompiler()
  31. {
  32.   gOutput.clear();
  33.   var compilePath = chooseFile("Locate your new compiler", "*.exe", "*.exe");
  34.   if (compilePath && compilePath.exists)
  35.   {
  36.     gHelpers.add("jdk-compiler_release", compilePath);
  37.     gHelpers.add("jdk-compiler_debug", compilePath);
  38.     gHelpers.add("jdk-compiler", compilePath);
  39.     gOutput.writeLine("Your new compiler is: " + compilePath.path);
  40.   }
  41. }
  42.  
  43. !!/Script
  44.